/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-04-07
*/
package com.rzico.basics.service;

import com.rzico.base.BaseMapper;
import com.rzico.base.impl.BaseServiceImpl;
import com.rzico.basics.entity.Coupon;
import com.rzico.basics.entity.Product;
import com.rzico.basics.entity.PromotionGift;
import com.rzico.basics.mapper.PromotionGiftMapper;
import com.rzico.basics.model.CouponVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <pre>
 * 二维码业务类
 * </pre>
 *
 * @author Rzico Boot
 * @version 1.0
 */
@Service
public class PromotionGiftService extends BaseServiceImpl<PromotionGift, String> {

    @Autowired
    private PromotionGiftMapper promotionGiftMapper;

    @Override
    public BaseMapper<PromotionGift, String> getMapper() {
        return promotionGiftMapper;
    }

    public int deleteList(Map<String, Object> params) {
        return promotionGiftMapper.deleteList(params);
    }

    public List<CouponVo> getCouponGift(Long promotionId) {
        Map<String,Object> params = new HashMap<>();
        params.put("promotionId",promotionId);
        return promotionGiftMapper.getCouponGift(params);
    };

    public List<Product> getProductGift(Long promotionId) {
        Map<String,Object> params = new HashMap<>();
        params.put("promotionId",promotionId);
        return promotionGiftMapper.getProductGift(params);
    };


}
